import request from '@/utils/request'

// 查询货转记账列表
export function listAccount(query) {
  return request({
    url: '/transfers/account/list',
    method: 'get',
    params: query
  })
}

// 查询货转记账详细
export function getAccount(goodsTransferAccountId) {
  return request({
    url: '/transfers/account/' + goodsTransferAccountId,
    method: 'get'
  })
}

// 新增货转记账
export function addAccount(data) {
  return request({
    url: '/transfers/account',
    method: 'post',
    data: data
  })
}

// 修改货转记账
export function updateAccount(data) {
  return request({
    url: '/transfers/account',
    method: 'put',
    data: data
  })
}

// 删除货转记账
export function delAccount(goodsTransferAccountId) {
  return request({
    url: '/transfers/account/' + goodsTransferAccountId,
    method: 'delete'
  })
}
